package users.michaelg.beans;

public final class ConfigurationBean {
	
	private final users.michaelg.beans.DatabaseParameters dbParameters;
	private final String foo;
	private int bar;
	private final users.michaelg.beans.AnotherClass me;

	public ConfigurationBean(DatabaseParameters dbParameters, String foo, AnotherClass me) {
		this.dbParameters = dbParameters;
		this.foo = foo;
		this.me = me;
	}

	public final void destroy() {
		System.out.println("destroy() method called");
	}


	public final DatabaseParameters getDbParameters() {
		return dbParameters;
	}


	public final String getFoo() {
		return foo;
	}


	public final int getBar() {
		return bar;
	}

	
	public final void init() {
		System.out.println("init() method called in ConfigurationBean.java");
	}


	public void setBar(int bar) {
		this.bar = bar;
	}
	
	
	@Override
	public String toString() {
		return "bar: " + bar + " foo: " + foo + " DB Parameters: " + dbParameters.toString()
			+ me.toString();
	}
}
